<!--
 * @version: v1.0
 * @Author: ItLy
 * @Date: 2021-03-03 21:57:45
 * @LastEditors: ItLy
 * @LastEditTime: 2021-03-03 22:46:05
-->
<template>
  <a-layout-footer class="footer">
    <div class="warpper">
      <p>
        CopyRight © 2019 - 2021 by itliuyang.com .All rights reserved.
        <a
          rel="noreferrer"
          href="http://www.beian.miit.gov.cn"
          target="_blank"
          data-v-29b99ca8=""
          >渝ICP备16008276号</a
        >
      </p>
      <p>相关侵权、建议等，请发E-mail：lycodk@gmail.com</p>
      <p class="links">
        <span>友情链接:</span>
        <a
          rel="noreferrer"
          :href="item.linkurl"
          target="_blank"
          v-for="(item, index) in links"
          :key="index"
          :title="item.linkdetail"
          >{{ item.linkname }}</a
        >
      </p>
    </div>
    <a-back-top>
      <div class="ant-back-top-inner">
        <i class="iconfont icon-xiangshang"></i>
      </div>
    </a-back-top>
  </a-layout-footer>
</template>

<script lang="ts">
import { Component, Prop, Vue, Emit } from "vue-property-decorator";
import { getErrorStatus } from "../api/test";
import config from "../utils/config";
import { formatDate } from "../utils/util.js";
@Component({})
export default class extends Vue {
  blShowBtn: boolean = true;
  scrollTop: number = 0;
  links: Array<any> = [];

  created() {
    if (this.$route.path == "/") {
      this.loadList();
    }
  }
  async loadList() {
    const res = await this.$axios.$get(config.BASE_URL + "/api/link/list");
    this.links = res.d;
  }
}
</script>
<style lang="scss" scoped>
p {
  margin-bottom: 5px;
}
.links {
  a {
    margin-left: 10px;
  }
}
/* 回到顶部 */
.ant-back-top-inner {
  height: 40px;
  position: fixed;
  right: 40px;
  bottom: 110px;
  background: #2c2d2f;
  z-index: 999;
  width: 40px;
  font-size: 12px;
  text-align: center;
  color: #fff;
  border-radius: 3px;
  line-height: 40px;
  cursor: pointer;
}
</style>